<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
    <head>
        <title></title>
        <meta charset="utf-8">
        <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <link rel="stylesheet" href="css/fonts/font-awesome.min.css">
        <link rel="stylesheet" href="css/ui-box.css">
        <link rel="stylesheet" href="css/ui-base.css">
        <link rel="stylesheet" href="css/ui-color.css">
        <link rel="stylesheet" href="css/appcan.icon.css">
        <link rel="stylesheet" href="css/appcan.control.css">
    </head>
    <body class="um-vp bc-bg" ontouchstart>
      <!--header开始-->
            <div id="header" class="uh bc-text-head ub bc-head">
              <div class="nav-btn" id="nav-left">
                  <div class="fa fa-book ulev2"></div>
              </div>
              <h1 class="ut ub-f1 ulev-3 ut-s tx-c" tabindex="0">校园生活</h1>
              <div class="nav-btn" id="nav-right">
              </div>
            </div>
      <!--header结束-->
    
    <div id="treeview" class="sc-bg">
    </div>
          
    <script src="js/appcan.js"></script>
    <script src="js/appcan.control.js"></script>
    <script src="js/appcan.treeview.js"></script>
    <script src="js/appcan.listview.js"></script>
    </body>
    <script>
        appcan.ready(function() {
        });
        
        //树状列表
                var tv = appcan.treeview({
                    selector : "#treeview",
                    defaultOpen : 1//默认打开第几项，必须包含数据
                });
                tv.set([{
                    header : "校内生活",
                    content : [{
                        title : '学校简介',
                        name : "listview",
                        url : "life/jx_content.html"
                }, {
                        title : '图书馆',
                        name : "listview",
                        url : "life/tsg_content.html"
                    }]
            }, {
                    header : "校园周边",
                    content : [{
                        title : '周边小吃',
                        name : "listview",
                        url : "life/zbjd_content.html"
                }, {
                        title : '周边景点',
                        name : "listview",
                        url : "life/zbxc_content.html"
                    }]
            }
            
            
            ]);
        tv.on('listviewClick', function(ele, data, obj) {
                    if (data.name && data.url) {
                        appcan.locStorage.setVal("lv_index", ele.data("index"));
                        appcan.window.open(data.name, data.url, 10);
                    }
                });
                tv.on('click', function(ele, obj, subobj) {
                    if (obj.name && obj.url) {
                        appcan.window.open(obj.name, obj.url, 10);
                    }
                });
                
                
                
    </script>
</html>
